package org.huntaway.lucene.document.impl;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;

import org.apache.lucene.document.Field;
import org.huntaway.lucene.po.FileBean;
import org.huntaway.lucene.po.TextBean;

public class TextDocument extends FileDocument<TextBean> {
	public void setBackField(File fileName) {
		super.setBackField(fileName);
	}
	public void setAnalyzerField(File fileName) {
		super.setAnalyzerField(fileName);
		try {
			doc.add(new Field(FileBean.REF_CONTENTS, new FileReader(fileName)));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}
}
